package head.first.model.observer;

/**
 * create by yiyongyao
 * Date:2018/3/6 下午4:26
 * Description: 目前状况布告板
 */
public class CurrentConditionsDispaly implements Observer,DisplayElement {


    private Subject weatherData;

    private float temp;

    private float humidity;

    public CurrentConditionsDispaly(Subject weatherData) {

        this.weatherData = weatherData;
    }

    @Override
    public void update(float temp, float humidity, float pressure) {
        this.temp = temp;
        this.humidity = humidity;
        display();

    }

    @Override
    public void display() {
        System.out.println("目前状况布告板显示:" + temp + " - " + humidity);

    }
}
